package cn.edu.sdju.fengguoyu.ahoedgemonitor;

import cn.edu.sdju.fengguoyu.po.ServiceInfoTableRow;
import javafx.fxml.Initializable;
import javafx.scene.control.TableColumn;
import javafx.scene.control.TableView;
import javafx.scene.control.cell.PropertyValueFactory;

import java.net.URL;
import java.util.ResourceBundle;

public class UserTable implements Initializable {
    public TableColumn<UserInfoTableRow, String> userId;
    public TableColumn<UserInfoTableRow, String> userAddress;
    public TableView<UserInfoTableRow> table;

    @Override
    public void initialize(URL location, ResourceBundle resources) {
        userId.setCellValueFactory(new PropertyValueFactory<>("userId"));
        userAddress.setCellValueFactory(new PropertyValueFactory<>("userAddress"));
        table.setItems(App.getApp().userInfoTableRowsObservableList);
    }
}
